package main

import (
	"net/http"
	"log"
	server "./server"
	controller "./controller"
	"github.com/labstack/echo"
)

func main () {
	httpServer ()
	servers := server.NewServer("/ws")
	go servers.Listen()
	log.Fatal(http.ListenAndServe(":8181", nil))
}
func httpServer (){
	e := echo.New()
	userController := controller.User{}


	e.GET("/", userController.Index)
	e.POST("/register", userController.Register)
	e.POST("/login", userController.Login)

	go e.Start(":8080")
}